<?php
defined('IN_IA') or exit('Access Denied');
require_once IA_ROOT . '/addons/unpor_baby/inc/function.php';
global $_W,$_GPC;

// 分页需要的参数

$page = remove_null(trim($_GPC['page']));// 获得页数
$limit = remove_null(trim($_GPC['limit']));// 获得每页显示条数
$search = remove_null(trim($_GPC['search']));// 获取搜索条件

//if(!empty($search)){
//    $res=pdo_fetchall("SELECT `id`,`user_name`,`vip` FROM ".tablename('unpor_baby_user')." WHERE `up_wecadeid`=".$uniacid." ORDER BY `up_time` DESC LIMIT ".($pindex - 1) * $psize.",{$psize}");
//}
$res=pdo_fetchall("SELECT `id`,`user_name`,`vip` FROM ".tablename('unpor_baby_user')." ORDER BY `id` DESC LIMIT ".($page - 1) * $limit.",{$limit}");

// 总数
$total = pdo_fetchcolumn('SELECT COUNT(`id`) FROM ' . tablename('unpor_baby_user'));  // 页面总数

return page_show_json(0,'',$total,$res);
?>